package com.yanmaohu.yulia.bean;

import java.util.List;

/**
 * @author Bright Lee
 */
public final class OrdinaryGroupingSetList {

    private int beginIndex;
    private int endIndex;
    private List<OrdinaryGroupingSet> ordinaryGroupingSetList;

    public OrdinaryGroupingSetList(List<OrdinaryGroupingSet> ordinaryGroupingSetList) {
        this.beginIndex = ordinaryGroupingSetList.get(0).getBeginIndex();
        this.endIndex = ordinaryGroupingSetList.get(ordinaryGroupingSetList.size() - 1).getEndIndex();
        this.ordinaryGroupingSetList = ordinaryGroupingSetList;
    }

    public int getBeginIndex() {
        return beginIndex;
    }

    public int getEndIndex() {
        return endIndex;
    }

    public int size() {
        return ordinaryGroupingSetList.size();
    }

    public OrdinaryGroupingSet get(int index) {
        return ordinaryGroupingSetList.get(index);
    }

}
